package cn.edu.sdjzu.cs.dingcan.entity;

import java.math.BigDecimal;
import java.util.Objects;

/**
 * 菜品列表实体类
 * 
 */
public class Food {

	private Long id;
	private String name;
	private FoodType foodType;
	private BigDecimal price;
	private BigDecimal mprice;
	private String remark;
	private String img;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public BigDecimal getPrice() {
		return price;
	}
	public void setPrice(BigDecimal price) {
		this.price = price;
	}
	public BigDecimal getMprice() {
		return mprice;
	}
	public void setMprice(BigDecimal mprice) {
		this.mprice = mprice;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	
	@Override
	public int hashCode() {
		return this.id.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Food) {
			Food food = (Food)obj;
			return Objects.equals(food.getId(), this.id);
		} else {
			return false;
		}
	}
	public FoodType getFoodType() {
		return foodType;
	}
	public void setFoodType(FoodType foodType) {
		this.foodType = foodType;
	}
}
